package com.alone.embedded.lucene.spring;

import com.alone.embedded.lucene.constant.FieldType;
import org.apache.lucene.analysis.Analyzer;
import org.wltea.analyzer.lucene.IKAnalyzer;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Alone
 * @date 2022/9/5 3:13 下午
 */
public class DefaultFieldTypeAnalyzerMapper implements FieldTypeAnalyzerMapper{

    @Override
    public Map<FieldType, Analyzer> get() {
        HashMap<FieldType, Analyzer> res = new HashMap<>(1);
        res.put(FieldType.TEXT, new IKAnalyzer(true));
        return res;
    }
}
